/**
 * Created by huxiaotong on 17-2-13.
 */
//通过cdn引入jquery
$(function () {

    $(".get-btn").click(function () {
        //被选中的按钮的id
        var $check_option;
        if($(this).attr("id")=="ctr_btn"){
            $check_option = $(".ctr-group :input:checked");
        }else {
            $check_option = $(".query-group :input:checked");
        }
        if ($check_option.length == 0){
            alert("请选择一个选项！")
            return false;
        }
        $.get("/console/manage/cmd",{
            "option":$check_option.val(),
            "type":$(this).attr("id")
        },function (data,textStatus) {
            $('#connect_wait').modal('hide');
        });
    });

    $("#connect_cancel_btn").click(function () {
        $('#connect_wait').modal('hide');
    });

    $(document).ajaxStart(function () {
        $('#connect_wait').modal({
            keyboard: false,
            backdrop: 'static'
        });
    });
});
